package org.sradon.mySpring.context;

import java.util.Arrays;

public class BeanDefine {
    // Bean在容器中的Key
    private String contextKey;

    // Bean的类型
    private Class<?> clazz;

    // Bean实现的接口
    private Class<?>[] interfaces;

    // Bean的继承的父类(没用)
    private Class<?> extendClass;

    // 构造器
    public BeanDefine(String contextKey, Class<?> clazz, Class<?>[] interfaces, Class<?> extendClass) {
        this.contextKey = contextKey;
        this.clazz = clazz;
        this.interfaces = interfaces;
        this.extendClass = extendClass;
    }

    public BeanDefine() {
    }

    @Override
    public String toString() {
        return "BeanDefine{" +
                "contextKey='" + contextKey + '\'' +
                ", clazz=" + clazz +
                ", interfaces=" + Arrays.toString(interfaces) +
                ", extendClass=" + extendClass +
                '}';
    }

    // getter setter
    public String getContextKey() {
        return contextKey;
    }

    public void setContextKey(String contextKey) {
        this.contextKey = contextKey;
    }

    public Class<?>[] getInterfaces() {
        return interfaces;
    }

    public void setInterfaces(Class<?>[] interfaces) {
        this.interfaces = interfaces;
    }

    public Class<?> getExtendClass() {
        return extendClass;
    }

    public void setExtendClass(Class<?> extendClass) {
        this.extendClass = extendClass;
    }

    public Class<?> getClazz() {
        return clazz;
    }

    public void setClazz(Class<?> clazz) {
        this.clazz = clazz;
    }
}
